<form class="dux-form uk-form   dux-form dux-form-right" action="{url('index')}" method="post" data-dux="form-bind"
      data-advanced="false">
    <div class="uk-input-group">
        <span class="uk-input-group-label">手机</span>
        <!--if{$userInfo.tel}-->
        <div class="uk-form-controls uk-form-controls-text"><a href="{url('username', ['type'=>'tel'])}">{$userInfo.tel}</a></div>
        <!--{else}-->
        <input type="text" name="tel" class="uk-form-field" placeholder="手机">
        <!--{/if}-->
    </div>
    <div class="uk-input-group">
        <span class="uk-input-group-label">邮箱</span>
        <!--if{$userInfo.email}-->
        <div class="uk-form-controls uk-form-controls-text"><a href="{url('username', ['type'=>'email'])}">{$userInfo.email}</a></div>
        <!--{else}-->
        <input type="text" name="email" class="uk-form-field" placeholder="邮箱">
        <!--{/if}-->
    </div>
    <div class="uk-input-group">
        <span class="uk-input-group-label">昵称</span>
        <input type="text" class="uk-form-field" placeholder="昵称" name="nickname" value="{$userInfo.nickname}">
    </div>


    <div class="uk-input-group">
        <span class="uk-input-group-label">所在地</span>
        <input type="text" class="uk-form-field" placeholder="选择地区"
               value="{$userInfo.province ? $userInfo.province . ' ' . $userInfo.city . ' ' . $userInfo.region : ''}"
               id="area" data-dux="form-location" data-province="province" data-city="city" data-district="region"
               readonly>
        <div id="area_layout"></div>
        <input type="hidden" name="province" value="{$userInfo.province}">
        <input type="hidden" name="city" value="{$userInfo.city}">
        <input type="hidden" name="region" value="{$userInfo.region}">
    </div>

    <div class="uk-input-group">
        <span class="uk-input-group-label">性别</span>
        <select name="sex" class="uk-form-field">
            <option value="1" <!--if{$userInfo.sex==1}-->selected="selected"<!--{/if}-->>男</option>
            <option value="0" <!--if{$userInfo.sex==0}-->selected="selected"<!--{/if}-->>女</option>
        </select>
    </div>
    <div class="uk-input-group">
        <span class="uk-input-group-label">生日</span>
        <!--if{$userInfo.birthday}-->
        <div class="uk-form-controls uk-form-controls-text">{$userInfo.birthday}</div>
        <!--{else}-->
        <input type="date" name="birthday" class="uk-form-field" value="{$userInfo.birthday}"/>
        <!--{/if}-->
    </div>
    <div class="uk-input-group">
        <span class="uk-input-group-label">职业</span>
        <input type="text" name="work" class="uk-form-field" value="{$userInfo.work}" placeholder="职业"/>
    </div>
    <div class="uk-input-group">
        <span class="uk-input-group-label">年收入</span>
        <select name="income" class="uk-form-field">
            <option value="1" <!--if{$userInfo.income==1}-->selected="selected"<!--{/if}-->>5万以下</option>
            <option value="2" <!--if{$userInfo.income==2}-->selected="selected"<!--{/if}-->>5-10万</option>
            <option value="3" <!--if{$userInfo.income==3}-->selected="selected"<!--{/if}-->>10-30万</option>
            <option value="4" <!--if{$userInfo.income==4}-->selected="selected"<!--{/if}-->>30万以上</option>
        </select>
    </div>
    <div class="uk-input-group">
        <span class="uk-input-group-label">家乡地</span>
        <input type="text" class="uk-form-field" placeholder="选择地区"
               value="{$userInfo.hometown_province ? $userInfo.hometown_province . ' ' . $userInfo.hometown_city . ' ' . $userInfo.hometown_region : ''}"
               id="hometown" data-dux="form-location" data-province="hometown_province" data-city="hometown_city" data-district="hometown_region"
               readonly>
        <div id="hometown_layout"></div>
        <input type="hidden" name="hometown_province" value="{$userInfo.hometown_province}">
        <input type="hidden" name="hometown_city" value="{$userInfo.hometown_city}">
        <input type="hidden" name="hometown_region" value="{$userInfo.hometown_region}">
    </div>

    <div class="uk-input-group">
        <span class="uk-input-group-label">年龄</span>
        <input type="text" name="age" class="uk-form-field" value="{$userInfo.age}" placeholder="年龄"/>
    </div>
    <div class="uk-input-group">
        <span class="uk-input-group-label">婚否</span>
        <select name="marry" class="uk-form-field">
            <option value="0" <!--if{$userInfo.marry==0}-->selected="selected"<!--{/if}-->>未婚</option>
            <option value="1" <!--if{$userInfo.marry==1}-->selected="selected"<!--{/if}-->>已婚</option>
        </select>
    </div>
    <div class="uk-input-group">
        <span class="uk-input-group-label">爱好</span>
        <input type="text" name="hobby" class="uk-form-field" value="{$userInfo.hobby}" placeholder="爱好"/>
    </div>
    <div class="uk-padding-small">
        <button class="uk-button uk-button-primary uk-button-block" type="submit">保存资料</button>
    </div>
</form>